package com.meixiang.activity.account.managers.myPurse;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.meixiang.R;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author zys
 *         我的钱包     1 余额收支明细    2 余额充值   3 提现到银行卡
 */
public class MyPurseActivity extends BaseActivity {


    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.tv_my_purse_account_balance)
    TextView tvMyPurseAccountBalance;
    @Bind(R.id.ll_income_detail)
    LinearLayout llIncomeDetail;
    @Bind(R.id.ll_balance_recharge)
    LinearLayout llBalanceRecharge;
    @Bind(R.id.ll_withdrawal_card)
    LinearLayout llWithdrawalCard;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_my_purse);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        setTitle("我的钱包");

    }

    @Override
    protected void initView() {
      //  AvailablePredeposit
        String  AvailablePredeposit=getIntent().getStringExtra("AvailablePredeposit");
        tvMyPurseAccountBalance.setText(AvailablePredeposit);
    }

    @Override
    protected void setData() {

    }

    @OnClick({R.id.ll_income_detail, R.id.ll_balance_recharge, R.id.ll_withdrawal_card})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_income_detail://余额收支明细
                startActivity(new Intent(MyPurseActivity.this,BalanceIncomeRecordActivity.class));
                break;
            case R.id.ll_balance_recharge://余额充值
                Intent intentPay = new Intent(context, RechargeActivity.class);
                intentPay.putExtra(RechargeActivity.RECHARGE_TYPE, RechargeActivity.PACKAGE_RECHARGE);
                startActivity(intentPay);
                break;
            case R.id.ll_withdrawal_card://提现到银行卡
                startActivity(new Intent(MyPurseActivity.this,WithdrawActivity.class));
                break;
        }
    }
}
